﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="ProjectImplManager.aspx.cs" Inherits="PMSWeb_ProjectImplManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                项目编号：
                </td>
                <td>
                    <asp:TextBox ID="S_ProjectCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td> 
                <td>
                项目名称：
                </td>
                <td>
                <asp:TextBox ID="S_ProjectName" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                投资类别：
                </td>
                <td> 
                <div class="select"><div><ofcc:DropDownList ID="S_InvestKind" runat="server"></ofcc:DropDownList></div></div>
                </td>
                <td rowspan="2">
                &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            <tr>
                <td>
                建设单位：
                </td>
                <td>
                <asp:TextBox ID="S_ProjectCreater" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                项目状态：
                </td>
                <td>
                <div class="select"><div><ofcc:DropDownList ID="S_ProjectState" runat="server"></ofcc:DropDownList></div></div>
                </td> 
                <td> &nbsp;
                </td>
                <td> &nbsp;
                </td> 
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">工程项目实施管理</div>
    <div class="webPanelContent"> 
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input ID="ProjectID" checked="checked" name="ProjectID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"ProjectID")%>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:BoundField DataField="ProjectCode" HeaderText="项目编号" />
                <asp:BoundField DataField="ProjectName" HeaderText="项目名称" />
                <asp:BoundField DataField="AcceptDate" HeaderText="受理日期" />
                <asp:BoundField DataField="ProjectCreater" HeaderText="建设单位" />
                <asp:BoundField DataField="ProjectUser" HeaderText="使用单位" />
                <asp:BoundField DataField="InvestKindName" HeaderText="投资类别" />
                <asp:BoundField DataField="ProjectState" HeaderText="项目状态" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="linkButton" >实施</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >修改</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="确定要删除吗?" OnClick="btnRemove_Click" CssClass="linkButton" >删除</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnDispatch" runat="server" OnClick="btnDispatch_Click" CssClass="linkButton" >派工</ofcc:LinkButton>
</div>
</asp:Panel>

        
<asp:Panel ID="pnlEdit" runat="server" Width="750px" Visible="false" CssClass="centerPanel">
<div class="webPanelBorder" >
    <div class="webPanelCaption">立项信息</div>
    <div class="webPanelContent">
        <table cellspacing="1" class="table">
            <tr>
                <td class="tableSubjectWidth">项目名称：
                </td>
                <td colspan="3">
                    <asp:TextBox ID="P_ProjectName" runat="server" CssClass="shortInput" MaxLength="64" ReadOnly="true" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>项目编号：</td>
                <td colspan="3"><asp:TextBox ID="P_ProjectCode" runat="server" CssClass="shortInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                 
                </td>
            </tr>
            <tr>
                <td>建设单位：</td>
                <td><asp:TextBox ID="P_ProjectCreater" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                     
                </td> 
                <td>使用单位：</td>
                <td><asp:TextBox ID="P_ProjectUser" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                     
                </td>
            </tr>
            <tr>
                <td>报送单位：</td>
                <td><asp:TextBox ID="P_ProjectPoster" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>

                </td> 
                <td>投资类别：</td>
                <td><div class="select"><div><ofcc:DropDownList ID="P_InvestKind" runat="server" ReadOnly="true"></ofcc:DropDownList></div></div>
                </td>
            </tr>
            <tr>
                <td>审核人：</td>
                <td><asp:TextBox ID="P_ProjectAuditer" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                </td> 
                <td>负责人：</td>
                <td><asp:TextBox ID="P_ProjectLeader" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>设计人：</td>
                <td><asp:TextBox ID="P_ProjectDesigner" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
               
                </td>  
                <td>执行人：</td>
                <td><asp:TextBox ID="P_ProjectExecutor" runat="server" CssClass="smallInput" MaxLength="64" ReadOnly="true"></asp:TextBox>
                </td> 
            </tr>
            <tr>
                <td>项目概述：</td>
                <td colspan="3"><asp:TextBox ID="P_Remark" runat="server" CssClass="shortInput" Width="90%" Rows="4" TextMode="MultiLine" ReadOnly="true"/>
                </td>  
            </tr>
        </table>

    </div> 
    
    <div class="webPanelCaption">实施信息</div>
    <div class="webPanelContent">
        <table cellspacing="1" class="table">
            <tr>
                <td class="tableSubjectWidth">受理日期：
                </td>
                <td>
                    <asp:TextBox ID="P_ImAcceptDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                    <ofcc:RequiredField ID="RequiredField5" runat="server" />
                </td> 
                <td>报送日期：</td>
                <td>
                <asp:TextBox ID="P_ImPostDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                <ofcc:RequiredField ID="RequiredField6" runat="server" />
                </td>
                <td>批复日期：</td>
                <td>
                <asp:TextBox ID="P_ImApprovalDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                    <ofcc:RequiredField ID="RequiredField7" runat="server" />
                </td>
            </tr>
            <tr>
                <td>开工日期：</td>
                <td><asp:TextBox ID="P_ImStartDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />

                </td> 
                <td>竣工日期：</td>
                <td><asp:TextBox ID="P_ImEndDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                </td> 
                <td>报俊日期：</td>
                <td><asp:TextBox ID="P_ImReportedEndDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                </td>
            </tr>
            <tr>
                <td>验收日期：</td>
                <td><asp:TextBox ID="P_ImCheckDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />

                </td> 
                <td>收款日期：</td>
                <td><asp:TextBox ID="P_ImCollectDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                </td> 
                <td>结算日期：</td>
                <td><asp:TextBox ID="P_ImSettleDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="10" />
                </td>
            </tr>
            <tr>
                <td>人工成本：</td>
                <td><asp:TextBox ID="P_ImLaborCost" runat="server" CssClass="smallInput" MaxLength="64"/>

                </td> 
                <td>材料成本：</td>
                <td><asp:TextBox ID="P_ImStuffCost" runat="server" CssClass="smallInput" MaxLength="64"/>
                </td> 
                <td>外包成本：</td>
                <td><asp:TextBox ID="P_ImOutCost" runat="server" CssClass="smallInput" MaxLength="64"/>
                </td>
            </tr>
            <tr>
                <td>预算金额：</td>
                <td><asp:TextBox ID="P_ImBudgetCost" runat="server" CssClass="smallInput" MaxLength="64"/>

                </td> 
                <td>决算金额：</td>
                <td><asp:TextBox ID="P_ImBalancedCost" runat="server" CssClass="smallInput" MaxLength="64"/>
                </td> 
                <td>项目结余：</td>
                <td><asp:TextBox ID="P_ImRemain" runat="server" CssClass="smallInput" MaxLength="64"/>
                </td>
            </tr>
        </table> 
    </div> 
    <div class="webPanelCaption">参与单位或用工情况(单位：万元/人民币)</div>
    <div class="webPanelContent">
         <asp:GridView ID="gridViewPart" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridViewPart_RowDataBound" 
            onsplitpageindexchange="gridView_SplitPageIndexChange" SplitPageIndex="1" 
            SplitPageStyle="Simple" 
            onrowdeleting="gridViewPart_RowDeleting"
            OnRowEditing="gridViewPart_RowEditing" 
            OnRowCancelingEdit="gridViewPart_RowCancelingEdit"
            OnRowUpdating="gridViewPart_RowUpdating" >
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>参与单位</HeaderTemplate>
                    <ItemTemplate>
                        <asp:HiddenField ID ="HiddenField0" runat="server" Value='<%#Eval("UUID") %>' />
                        <%#Eval("ProjectPartName")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:HiddenField ID ="HiddenField1" runat="server" Value='<%#Eval("UUID") %>' />
                        <asp:TextBox ID="ProjectPartName" runat="server" Width="100" MaxLength="20" style="border:solid 1px #ccc" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField7" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ProjectPartName"
                            Display="None" ErrorMessage="请输入参与单位" ValidationGroup="submitPart"></asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <HeaderStyle Width="130" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>总额（用工）</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label0" runat="server" Text='<%#Eval("AllCount")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="AllCount" runat="server"  Width="80" style="border:solid 1px #ccc" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField8" runat="server" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="AllCount"
                            Display="None" ErrorMessage="请输入总额（用工）" ValidationGroup="submitPart"></asp:RequiredFieldValidator>
                    </EditItemTemplate>                    
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>首付</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%#Eval("FirstCount")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="FirstCount" runat="server" Width="80" style="border:solid 1px #ccc" ></asp:TextBox>
                    </EditItemTemplate>                    
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>二次付款</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%#Eval("SecondCount")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="SecondCount" runat="server" Width="80" style="border:solid 1px #ccc" ></asp:TextBox>
                    </EditItemTemplate>                    
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>三次付款</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%#Eval("ThirdCount")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="ThirdCount" runat="server" Width="80" style="border:solid 1px #ccc" ></asp:TextBox>
                    </EditItemTemplate>                    
                </asp:TemplateField>
                <asp:TemplateField>
                    <HeaderTemplate>尾款</HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label4" runat="server" Text='<%#Eval("EndCount")%>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="EndCount" runat="server" Width="80" style="border:solid 1px #ccc" ></asp:TextBox>
                    </EditItemTemplate>                    
                </asp:TemplateField>
                <asp:CommandField ShowDeleteButton="true" ShowEditButton="true" ShowCancelButton="true" ValidationGroup="submitPart"
                     DeleteText="删除" UpdateText="保存" EditText="修改" CancelText="取消" />
            </Columns>
        </asp:GridView>

    </div> 
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">实施</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">返回</ofcc:LinkButton>
</div>
<asp:HiddenField ID="hfAddOrEdit" runat="server" />
<asp:HiddenField ID="hfProjectID" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="P_ImAcceptDate"
    Display="None" ErrorMessage="请输入受理日期" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="P_ImPostDate"
    Display="None" ErrorMessage="请输入报送日期" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="P_ImApprovalDate"
    Display="None" ErrorMessage="请输入批复日期" ValidationGroup="submit"></asp:RequiredFieldValidator>  


<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />   
<asp:ValidationSummary ID="ValidationSummary2" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submitPart" /> 
    
 
</asp:Panel>
</asp:Content>

